package com.wx.core.process;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.wx.core.vo.MsgRequest;


/**
 * @desc 基本流程抽象类
 * @author Jcrazy
 * @date 2014-12-5
 * @time 下午5:10:14
 * @version 1.0
 */
public abstract class BaseProcess{
	/**
	 * 流程处理抽象方法
	 * @param req
	 * @param res
	 * @param log
	 * @param xml 消息串
	 */
	public abstract BaseResult process(HttpServletRequest req,HttpServletResponse res,MsgRequest msgReq);
	
	protected String getAbsolutPath(HttpServletRequest req){
		String refererUrl = req.getScheme()+"://" + req.getServerName();  
        if(req.getServerPort()>0 && req.getServerPort()!=80){
        	refererUrl=refererUrl+":"+ req.getServerPort();  
        }
        refererUrl=refererUrl+ req.getContextPath();  
    	return refererUrl;
	}
}
